package com.geekaca.atm;

import java.util.ArrayList;

public class AccountList {
    // 工具类中创建静态集合
    static ArrayList<Account> accountList = new ArrayList<>();
    private  static AccountList instance;


    private AccountList(){};

    public static AccountList getAccountList (){
        if (instance ==null){
            instance = new AccountList();
        }
        return instance;
    };


//    public static  ArrayList<Account> getArrayList();

    // 集合增加的静态方法
    public  static  void add(Account account){
        accountList.add(account);
    }

    // 集合删除元素的静态方法
    public static void remove(Account account){
        accountList.remove(account);
    }






}
